<style>
	.ui-autocomplete-loading { background: white url('../img/loading.gif') right center no-repeat; }
</style>
<?php 
 echo $this->Html->css('jquery.ui.core');
		echo $this->Html->css('jquery.ui.theme');
		echo $html->script('jquery-1.6.3');
		echo $this->Html->script('jquery.ui.core');
		echo $this->Html->script('jquery.ui.widget');
		
echo $this->Html->css('jquery.ui.autocomplete');


echo $this->Html->script('jquery.ui.position');
echo $this->Html->script('jquery.ui.autocomplete');
?>
<script type="text/javascript">
<!--
$(function() {
	$("#textsearch").autocomplete({
		 source: $('#link').val(),
		 minLength: 1,
		});
});

//-->
</script>
<?php
echo $form->hidden('',array('id'=>'link','value'=>$this->webroot.'dangkies/autocomplete'));
echo $form->input('textsearch',array('id'=>'textsearch'));
?>